package Test;

import java.net.InetAddress;
import java.util.Random;

import SecureUtil.CookieHelper;

public class CookieTest {

	
	private static InetAddress ip;
	private static int cookieseed = new Random().nextInt();
	
	public static void main(String[]args){
		
		try {
			ip =   InetAddress.getLocalHost();
			String cookie = CookieHelper.getCookie(ip, 1234, cookieseed);
			
			System.out.println(cookie);
			
			//ip = InetAddress.getByName("192.168.10.1");
			cookie = CookieHelper.getCookie(ip, 12332, cookieseed);
			
			System.out.println(cookie);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
}
